package com.x4sc.common.exception;

public class CustomException extends RuntimeException {

    private final String errCode;
    private final int httpStatus;
    private final String[] errKeys;
    private final String errMessage;

    public CustomException(String errCode, String errMessage, int httpStatus, String... errKeys) {
        this.errCode = errCode;
        this.errMessage = errMessage;
        this.httpStatus = httpStatus;
        this.errKeys = errKeys;
    }

    public String getErrCode() {
        return errCode;
    }

    public String getErrMessage() {
        return errMessage;
    }

    public int getHttpStatus() {
        return httpStatus;
    }

    public Object[] getErrKeys() {
        return errKeys;
    }

    @Override
    public String getMessage() {
        return getErrMessage();
    }

    @Override
    public String getLocalizedMessage() {
        return getErrMessage();
    }
}
